<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title>领取优惠券</title>
<link rel="stylesheet" type="text/css" href="css/lib/swiper.min.css"/>
<link rel="stylesheet" type="text/css" href="css/lib/doumee.css"/>
<link rel="stylesheet" type="text/css" href="css/public.css"/>
<link rel="stylesheet" type="text/css" href="css/lib/dialog.css"/>
<link rel="stylesheet" type="text/css" href="css/weal.css"/>
<script src="js/lib/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
<script src="js/lib/swiper.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/lib/vue-2.5.17.js" type="text/javascript" charset="utf-8"></script>
<script src="js/lib/doumee.js" type="text/javascript" charset="utf-8"></script>
<script src="js/data.js" type="text/javascript" charset="utf-8"></script>
<script src="js/lib/dialog.js" type="text/javascript" charset="utf-8"></script>
</head>

<body>

<div class="swiper-container Main" id="allWeal">
	<div class="swiper-wrapper">
		<div class="swiper-slide content">
			
			<div class="children" id="weal">
				
				<!--优惠券福利-->
				<div class="wealMod homeMod" style="padding-top: 14px;">
					
					<div class="weal-wrap">
						
						<ul class="weal-box" :type="wealData.statu">
							<li class="main-info flex-row">
								<div class="val">
									<span class="unit">￥</span>{{wealData.val}}
								</div>
								<div class="flex-full info flex-row">
									<dl class="flex-full">
										<dt>{{wealData.type}}</dt>
										<dd>{{wealData.start}} ~ {{wealData.end}}</dd>
									</dl>
								</div>
							</li>
							<li class="ex-info flex-row" @click="controlRuler($event)">
								<div class="flex-full ruler animate dm-wrap">{{wealData.rule}}</div>
								<a class="btn animate"></a>
							</li>
						</ul>
						
					</div>
					
					<button class="submitWeal" type="button">立即领取</button>
					
				</div>	
				<!--优惠券福利 end-->
				
			</div>
			
		</div>
	</div>
</div>

<script type="text/javascript">

	var vm = new Vue({
		el:'#allWeal',
		data:{
			//优惠券福利
			wealData:{id:1,val:'100',type:'满2000可用',start:'2018.09.10',end:'2018.10.10',rule:'适用于志邦厨柜（红旗美门店），志邦厨柜（蓝旗美门店），志邦厨柜（黄旗美门店）',statu:0},
		},
		methods:{
			
			//收放优惠券详情
			controlRuler:function(e){
				var node = e.currentTarget.children;
				if(node[1].className.indexOf('active') < 0){
					//展开
					node[0].className = 'flex-full ruler animate';
					node[1].className = 'btn animate active';
				}else{
					//收起
					node[0].className = 'flex-full ruler animate dm-wrap';
					node[1].className = 'btn animate';
				};
			},
			
		},
		//渲染完初始数据后执行
		mounted:function(){
			pullSwiper('#allWeal');
		}
	});

</script>

</body>
</html>
